EventManager = function(config){
    config = config || {};
    if (config.initialConfig) {
        config = config.initialConfig;
    }

    this.initialConfig = config;

    Ext.apply(this, config);
    this.addEvents(
        "node-selection",
        "display-status-message"
    );
    EventManager.superclass.constructor.call(this);
};

Ext.extend(EventManager, Ext.util.Observable, {
    ctype: "EventManager",

    fireNodeSelectEvent: function(node) {
        expandNode(node);
        this.fireEvent("node-selection", node);
    },

    registerNodeSelectListener: function(callback, scope, opts) {
        this.addListener("node-selection", callback, scope, opts);
    },

    fireStatusMessageEvent: function(message) {
        this.fireEvent("display-status-message", message);
    },

    registerStatusMessageListener: function(callback, scope, opts) {
        this.addListener("display-status-message", callback, scope, opts);
    }
});

var eventManager = new EventManager();

